package com.ytjj.qmyx.users.mapper;

import com.ytjj.common.model.UsersResponse;
import com.ytjj.qmyx.users.model.HomeImageResponse;
import com.ytjj.qmyx.users.model.Users;
import com.ytjj.qmyx.users.model.UsersExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface UsersMapper {
    long countByExample(UsersExample example);

    int deleteByExample(UsersExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Users record);

    int insertSelective(Users record);

    List<Users> selectByExample(UsersExample example);

    Users selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Users record, @Param("example") UsersExample example);

    int updateByExample(@Param("record") Users record, @Param("example") UsersExample example);

    int updateByPrimaryKeySelective(Users record);

    int updateByPrimaryKey(Users record);

    List<UsersResponse> selectRandom();

    HomeImageResponse getHomeImage(Integer homeImageId);

    List<Integer> getUsersByVisitorId(String visitorId);

    int updateUserScoreByToken(@Param("token") String token,@Param("score") Integer score);

    Users queryUsersByToken(@Param("token") String token);
}